<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class  CreateOtherOrderStatusesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('other_order_statuses', function (Blueprint $table) {
            $table->id()->comment('订单操作记录表');
            $table->string('change_type',20)->default('pc')->comment('操作类型 pc:pc |wechatApplet :微信小程序 |app: app');
            $table->string('change_mark')->comment('操作备注');
            $table->integer('order_id')->comment('订单ID')->index();
            $table->tinyInteger('shop_type')->default(0)->comment('订单类型 0：会员卡 1：非会员卡');
            $table->string('operate_man',20)->default('system')->comment('操作人：system: 系统 User: 用户 Administrator:后台管理员');
            $table->string('order_status',30)->default('pendingPayment')->comment('订单状态：pendingPayment: 待付款 toBeShipped: 待发货 shipped: 已发货 completed: 已完成 closed: 已关闭 invalidOrder: 无效订单');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('other_order_statuses');
    }
}
